﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LotusIslandOrderProcessing.PLCMake
{
    public class PlcReadBol
    {
        private static PlcReadBol instance;
        private PlcReadBol() { }

        public static PlcReadBol Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new PlcReadBol();
                }
                return instance;
            }
        }
        /// <summary>
        /// 咖啡1打印请求1  0-1
        /// </summary>
        public bool Print1 { get; set; } = false;
        /// <summary>
        /// 咖啡2打印请求2  0-1
        /// </summary>
        public bool Print2 { get; set; } = false;
        /// <summary>
        /// 奶茶1打印请求1  0-1
        /// </summary>
        public bool Print3 { get; set; } = false;
        /// <summary>
        /// 奶茶2打印请求2  0-1
        /// </summary>
        public bool Print4 { get; set; } = false;
        /// <summary>
        /// 咖啡1  0空闲，1制作中，2待取餐
        /// </summary>
        public bool Making1 { get; set; } = false;
        /// <summary>
        /// 缺杯1咖啡
        /// </summary>
        public bool Matter0 { get; set; } = false;
        /// <summary>
        /// 缺杯2奶茶
        /// </summary>
        public bool Matter1 { get; set; } = false;
        /// <summary>
        /// 缺杯3冰淇淋
        /// </summary>
        public bool Matter2 { get; set; } = false;
        /// <summary>
        /// 缺咖啡豆
        /// </summary>
        public bool Matter3 { get; set; } = false;
        /// <summary>
        /// 缺咖啡奶
        /// </summary>
        public bool Matter4 { get; set; } = false;
        /// <summary>
        /// 缺水1
        /// </summary>
        public bool Matter5 { get; set; } = false;
        /// <summary>
        /// 缺水2
        /// </summary>
        public bool Matter6 { get; set; } = false;
        /// <summary>
        /// 缺水3
        /// </summary>
        public bool Matter7 { get; set; } = false;
        /// <summary>
        /// 缺水4
        /// </summary>
        public bool Matter8 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料1
        /// </summary>
        public bool Matter9 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料2
        /// </summary>
        public bool Matter10 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料3
        /// </summary>
        public bool Matter11 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料4
        /// </summary>
        public bool Matter12 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料5
        /// </summary>
        public bool Matter13 { get; set; } = false;
        /// <summary>
        /// 奶茶缺料6
        /// </summary>
        public bool Matter14 { get; set; } = false;
        /// <summary>
        /// 果糖缺料1
        /// </summary>
        public bool Matter15 { get; set; } = false;
        /// <summary>
        /// 果糖缺料2
        /// </summary>
        public bool Matter16 { get; set; } = false;
        /// <summary>
        /// 果糖缺料3
        /// </summary>
        public bool Matter17 { get; set; } = false;
        /// <summary>
        /// 冰淇淋缺料1
        /// </summary>
        public bool Matter18 { get; set; } = false;
        /// <summary>
        /// 冰淇淋缺料2
        /// </summary>
        public bool Matter19 { get; set; } = false;
        /// <summary>
        /// JAKA1  0-1故障
        /// </summary>
        public bool Fault0 { get; set; } = false;
        /// <summary>
        /// JAKA2  0-1故障
        /// </summary>
        public bool Fault1 { get; set; } = false;
        /// <summary>
        /// JAKA3  0-1故障
        /// </summary>
        public bool Fault2 { get; set; } = false;
        /// <summary>
        /// 咖啡机  0-1故障
        /// </summary>
        public bool Fault3 { get; set; } = false;
        /// <summary>
        /// 冰淇淋机  0-1故障
        /// </summary>
        public bool Fault4 { get; set; } = false;
        ///// <summary>
        ///// 制冰机  0-1故障
        ///// </summary>
        //public bool Fault5 { get; set; } = false;
    }
    public class PlcReadMsg
    {
        private static PlcReadMsg instance;
        private PlcReadMsg() { }

        public static PlcReadMsg Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new PlcReadMsg();
                }
                return instance;
            }
        }
        /// <summary>
        /// 奶茶打印请求1  0-1
        /// </summary>
        public int Print3 { get; set; } = 0;
        /// <summary>
        /// 奶茶打印请求2  0-1
        /// </summary>
        public int Print4 { get; set; } = 0;
        /// <summary>
        /// 奶茶1  0空闲，1制作中，2待取餐
        /// </summary>
        public int Making3 { get; set; } = 0;
        /// <summary>
        /// 奶茶2  0空闲，1制作中，2待取餐
        /// </summary>
        public int Making4 { get; set; } = 0;          
        /// <summary>
        /// 奶茶1  订单号
        /// </summary>
        public string Order_Number3 { get; set; } = "";
        /// <summary>
        /// 奶茶2  订单号
        /// </summary>
        public string Order_Number4 { get; set; } = "";
        /// <summary>
        /// 缺杯2奶茶
        /// </summary>
        [JsonProperty("Matter[1]")]
        public int Matter1 { get; set; } = 0;
        /// <summary>
        /// 缺水1
        /// </summary>
        [JsonProperty("Matter[5]")]
        public int Matter5 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料7
        /// </summary>
        [JsonProperty("Matter[8]")]
        public int Matter8 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料1
        /// </summary>
        [JsonProperty("Matter[9]")]
        public int Matter9 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料2
        /// </summary>
        [JsonProperty("Matter[10]")]
        public int Matter10 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料3
        /// </summary>
        [JsonProperty("Matter[11]")]
        public int Matter11 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料4
        /// </summary>
        [JsonProperty("Matter[12]")]
        public int Matter12 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料5
        /// </summary>
        [JsonProperty("Matter[13]")]
        public int Matter13 { get; set; } = 0;
        /// <summary>
        /// 奶茶缺料6
        /// </summary>
        [JsonProperty("Matter[14]")]
        public int Matter14 { get; set; } = 0;
        /// <summary>
        /// JAKA1  0-1故障
        /// </summary>
        [JsonProperty("Fault[0]")]
        public int Fault0 { get; set; } = 0;
        /// <summary>
        /// JAKA2  0-1故障
        /// </summary>
        [JsonProperty("Fault[1]")]
        public int Fault1 { get; set; } = 0;
        /// <summary>
        /// 制冰机  0-1故障
        /// </summary>
        [JsonProperty("Fault[5]")]
        public int Fault5 { get; set; } = 0;
    }
}
